﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using System.Web.Mvc;
using Nop.Web.Framework;
using Nop.Core.Domain.Logistics;
using Nop.Admin.Models.Common;

namespace Nop.Admin.Models.Logistics
{
    public class LogisticsPlanHistoryModel
    {
        public LogisticsPlanHistoryModel()
        {
            CourierId = 0;  // valid values should be > 0
        }

        private ICollection<SelectListItem> _availableCouriers;

        [NopResourceDisplayName("Admin.Logistics.List.StartDate")]
        [UIHint("DateNullable")]
        public DateTime? StartDate { get; set; }

        [NopResourceDisplayName("Admin.Logistics.List.EndDate")]
        [UIHint("DateNullable")]
        public DateTime? EndDate { get; set; }

        [NopResourceDisplayName("Admin.Logistics.Courier")]
        public int CourierId { get; set; }

        public virtual ICollection<SelectListItem> AvailableCouriers
        {
            get { return _availableCouriers ?? (_availableCouriers = new List<SelectListItem>()); }
            set { _availableCouriers = value; }
        }
    }
}
